package com.nuo.backend.common.utils;

import java.util.regex.Pattern;

/**
 * @description: TODO 密码
 * @author nuo
 * @date 2022/11/18 0:23
 * @version 1.0
 */
public class PwdUtils {

    private static final String REGEX = "^\\w{6}$";
    // 必须包含数字和字母的匹配表达式
    // private static final String REGEX = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6}$";
    public static boolean isOk(String str) {
        return Pattern.matches(REGEX, str);
    }

}
